package madixin.t217;

import java.util.HashMap;
import java.util.Map;

class Solution {
    public boolean containsDuplicate(int[] nums) {
        Map<Integer, Integer> index = new HashMap<>();
        for (int n : nums) {
            if (index.containsKey(n)) {
                return true;
            }
            index.put(n, 0);
        }

        return false;
    }
}